import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

Vue.config.productionTip = false

//elementUI
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI, { size: "mini" });
//优化成全局过滤器
import {formatTime} from "./utils/time";
//自定义指令
Vue.directive('title',  function (el, binding) {
  //页面的title = 当前元素的tiele
  document.title = el.dataset.title
})

// 格式化时间
Vue.filter('format', formatTime)


new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
